// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class DispatchList : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<DispatchList, MasterDbContextLocator>
    {

        public int DispatchId { get; set; }
        public int AnnounceId { get; set; }
        public string AreaCode { get; set; }
        public string AreaName { get; set; }
        public int BaseStationID { get; set; }
        public string BaseStation { get; set; }
        public string BaseStationType { get; set; }
        public string BaseStationLevel { get; set; }
        public DateTime? ExecutionDate { get; set; }
        public string GeneratorIds { get; set; }
        public string GeneratorInfo { get; set; }
        public string GenExecutionDepartment { get; set; }
        public string GenExecutionPerson { get; set; }
        public string GenExecutionPersonPhone { get; set; }
        public string GenExecutionPersonWX { get; set; }
        public bool? BDispathFinished { get; set; }
        public string PrjCode { get; set; }
        public string PrjName { get; set; }
    
        public void Configure(EntityTypeBuilder<DispatchList> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasKey(e => e.DispatchId)
                    .HasName("PK__Dispatch__434DBD558044A07E");

                entityBuilder.Property(e => e.AreaCode)
                    .IsRequired()
                    .HasMaxLength(50);

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStation).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationLevel).HasMaxLength(20);

                entityBuilder.Property(e => e.BaseStationType).HasMaxLength(20);

                entityBuilder.Property(e => e.ExecutionDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");

                entityBuilder.Property(e => e.GenExecutionDepartment).HasMaxLength(50);

                entityBuilder.Property(e => e.GenExecutionPerson).HasMaxLength(20);

                entityBuilder.Property(e => e.GenExecutionPersonPhone).HasMaxLength(20);

                entityBuilder.Property(e => e.GenExecutionPersonWX).HasMaxLength(50);

                entityBuilder.Property(e => e.PrjCode).HasMaxLength(100);

                entityBuilder.Property(e => e.PrjName).HasMaxLength(100);
        }

    }
}

